﻿using Pb;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SettlementReady : MonoBehaviour {

    public GameObject ReadyBtn;

    void Awake()
    {
        UIEventListener.Get(ReadyBtn).onClick = ButtonClick;
    }
    void ButtonClick(GameObject button)
    {
        if (button.name == "ReadyBtn")
        {
            //发送ready消息
            RoomReadyRequest lg = new Pb.RoomReadyRequest { RoomId = EginDDZ.Instance.roomId };
            SocketManager socketManager = SocketManager.Instance;
            socketManager.SendProtobuf1(lg, MsgId.RoomReadyRequest);
            Destroy(gameObject);
        }

    }
}
